package com.example.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 默认HTTP拦截器
 * Created by yangbajing(yangbajing@gmail.com) on 2016-09-23.
 */
public class DefaultHttpInterceptor extends HandlerInterceptorAdapter {
    @Autowired
    private DemoTokenComponent demoTokenComponent;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        response.addHeader("at", "-1");
        return true;
    }
}
